/* 自定义弹窗
<div id="id">
    <div class="pop-dialog" style="display: none;">
        <div class="pop-body">
            <span class="pop-close">&bigotimes;</span>
            <div class="pop-content">
                内容区
            </div>
        </div>
    </div>
</div>
*/

var daley = 200;
$(function () {
    $('.pop-close, .pop-dialog').click(function (e) {
        closePop();
    });
    // 阻止冒泡事件
    $('.pop-body').click(function (e) {
        e.stopPropagation();
    });

});

window.closeBefore = function () {

};

function openPop(id) {
    $('#' + id + ' > .pop-dialog').fadeIn(daley);
}

function closePop(id) {
    closeBefore();
    if (id === undefined) {
        $('.pop-dialog').fadeOut(daley);
    } else
        $('#' + id + ' > .pop-dialog').fadeOut(daley);
}

// 根据数字获取abcd
function getOptLetter(i) {
  var a = "A";
  var number = a.charCodeAt();
  return String.fromCharCode(number + i);
}